package cn.worldyao.homework.service.impl;

import cn.worldyao.homework.entity.KeClass;
import cn.worldyao.homework.entity.Teachers;
import cn.worldyao.homework.mapper.KeClassMapper;
import cn.worldyao.homework.service.KeClassService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author yaozi
 * @since 2020-05-10
 */
@Service
public class KeClassServiceImpl extends ServiceImpl<KeClassMapper, KeClass> implements KeClassService {


    @Override
    public List<KeClass> getClassList(Teachers teachers) {
        QueryWrapper<KeClass> wrapper = new QueryWrapper<>();
//        wrapper.eq("CLASS_TC_ID", teachers.getId());
        List<KeClass> list = this.list();
        return list;
    }

    @Override
    public List<KeClass> getAllClass() {
        return this.baseMapper.getAllClasses();
    }

    @Override
    public List<KeClass> getMyClasses(Teachers teachers) {
//        QueryWrapper<KeClass> wrapper = new QueryWrapper<>();
//        wrapper.
//        wrapper.eq("CLASS_TC_ID", teachers.getId());
//        List<String> list = this.list();
        List<KeClass> list = this.baseMapper.getMyClasses(0);
        return list;
    }
}
